import request from '@/utils/request'

// 查询维修报告列表
export function listRepairReport(query) {
  return request({
    url: '/analysis/repairReport/list',
    method: 'get',
    params: query
  })
}

// 查询维修报告详细
export function getRepairReport(reportId) {
  return request({
    url: '/analysis/repairReport/' + reportId,
    method: 'get'
  })
}

// 根据订单ID 获取维修报告
export function getRepairReportByOrderId(orderId) {
  return request({
    url: '/analysis/repairReport/order/' + orderId,
    method: 'get'
  })
}

// 新增维修报告
export function addRepairReport(data) {
  return request({
    url: '/analysis/repairReport',
    method: 'post',
    data: data
  })
}

// 修改维修报告
export function updateRepairReport(data) {
  return request({
    url: '/analysis/repairReport',
    method: 'put',
    data: data
  })
}

// 删除维修报告
export function delRepairReport(reportId) {
  return request({
    url: '/analysis/repairReport/' + reportId,
    method: 'delete'
  })
}
